How nooneknowspeter/campi-cli works
campi-cli is a command-line tool for managing marketing campaigns as code. The documented workflow is to initialize a project, validate its configuration and manifests, plan changes from a manifest, then apply them; users can also import existing campaigns into state and manage configuration. The README documents platform support as a goal, with Meta and TikTok implemented and other adapters incomplete. Source excerpts were unavailable, so edges are limited to relationships documented in the README.
Main entry points: commands.zig Command dispatch · init.zig Initialize project · validate.zig Validate inputs · plan.zig Plan changes
Components 20
CLI workflow
- CLI entry
src/cli/main.zig - Command dispatch
src/cli/commands.zig - Initialize project
src/cli/commands/init.zig - Validate inputs
src/cli/commands/validate.zig - Plan changes
src/cli/commands/plan.zig - Apply changes
src/cli/commands/apply.zig - Import campaigns
src/cli/commands/import.zig - Manage config
src/cli/commands/config.zig - Inspect state
src/cli/commands/state.zig
Campaign inputs
- Configuration
src/config/main.zig - Campaign manifest
src/manifest/main.zig - Change plan
src/plan/main.zig - Campaign state
src/state/main.zig
Platform integrations
- Platform adapters
src/platforms/main.zig - Meta adapter
src/platforms/meta/main.zig - TikTok adapter
src/platforms/tiktok/main.zig
Runtime support
- Filesystem
src/fs/main.zig - Artifact handling
src/artifacts/main.zig
Other components
- Operator
- Marketing platforms
Connections 23
- Operator → CLI entry: runs CLI
- CLI entry → Command dispatch: dispatches commands
- Command dispatch → Initialize project: dispatches
- Command dispatch → Validate inputs: dispatches
- Command dispatch → Plan changes: dispatches
- Command dispatch → Apply changes: dispatches
- Command dispatch → Import campaigns: dispatches
- Command dispatch → Manage config: dispatches
- Command dispatch → Inspect state: dispatches
- Initialize project → Configuration: writes base config
- Initialize project → Filesystem: prepares directory
- Validate inputs → Configuration: validates
- Validate inputs → Campaign manifest: validates
- Plan changes → Campaign manifest: reads
- Plan changes → Change plan: computes changes
- Apply changes → Change plan: applies changes
- Manage config → Configuration: manages
- Inspect state → Campaign state: reads and compares
- Import campaigns → Campaign state: imports campaigns
- Platform adapters → Meta adapter: provides adapter
- Platform adapters → TikTok adapter: provides adapter
- Meta adapter → Marketing platforms: connects to
- TikTok adapter → Marketing platforms: connects to