agentstack init
Synopsis
Section titled “Synopsis”agentstack init [options]Description
Section titled “Description”The init command is the primary entry point for AgentStack. It runs an interactive setup wizard that:
- Detects whether you want to export your current tool’s config or restore from an existing profile
- Runs readiness checks (verifies required tools are installed)
- Optionally installs missing tools via your package manager
- Creates or restores a canonical profile
- Activates the resulting profile in the local hub
- Optionally applies the profile to your target provider
Options
Section titled “Options”| Flag | Type | Default | Description |
|---|---|---|---|
--profile <name> | string | main | Profile name to create or restore |
--yes | boolean | false | Skip interactive prompts, accept defaults |
--setup-mode <mode> | export|restore | interactive | Export current setup or restore from profile |
--current-tool <tool> | codex|claude|opencode|none | interactive | Current AI tool to import from |
--profile-template <path|url> | string | — | Seed profile from a file or URL |
--restore-to <tool> | none|codex|claude|opencode | interactive | Target tool to restore config to |
--sync-mode <mode> | local|zero-config|git | interactive | How to sync the profile |
--repo <url> | string | — | Git remote URL (required for git sync mode) |
--branch <name> | string | main | Git branch (for git sync mode) |
--package-manager <pm> | brew|apt|choco | auto-detect | Package manager for installing missing tools |
--install-missing | boolean | false | Auto-install missing tools without prompting |
Examples
Section titled “Examples”Interactive setup (recommended for first-time users):
agentstack initExport current Codex setup to a local profile:
agentstack init \ --profile main \ --yes \ --setup-mode export \ --current-tool codex \ --sync-mode localRestore profile from zero-config sync (GitHub Gist):
agentstack init \ --profile main \ --yes \ --setup-mode restore \ --sync-mode zero-config \ --restore-to codexRestore from a git remote to a team setup:
agentstack init \ --profile team \ --yes \ --setup-mode restore \ --sync-mode git \ --repo https://github.com/acme/agentstack-profiles \ --branch main \ --restore-to claude