A command-line tool to interact with Codacy Cloud directly from your terminal.
README
A command-line tool to interact with Codacy Cloud directly from your terminal. Built with Node.js and TypeScript.
npm install -g "@codacy/codacy-cloud-cli"
git clone https://github.com/alerizzo/codacy-cloud-cli.git
cd codacy-cloud-cli
npm install
npm run build
npm link
Log in interactively (recommended):
codacy login
Or set the CODACY_API_TOKEN environment variable:
export CODACY_API_TOKEN=your-token-here
You can get a token from Codacy > My Account > Access Management > API Tokens (link).
The login command stores the token encrypted at ~/.codacy/credentials. The environment variable takes precedence over stored credentials when both are present.
codacy <command> [options]
codacy <command> --help # Detailed usage for any command
| Option | Description |
|---|---|
| -o, --output <format> | Output format: table (default) or json |
| -V, --version | Show version |
| -h, --help | Show help |
When you run a command inside a git repository, the CLI automatically detects the provider, organization, and repository from the origin remote URL. This means you can skip those arguments entirely:
# Inside a GitHub repo — auto-detects provider/org/repo
codacy issues
codacy pull-request 42
codacy tools
# Or specify them explicitly
codacy issues gh my-org my-repo
Supported providers: GitHub (gh), GitLab (gl), Bitbucket (bb).
| Command | Description |
|---|---|
| login | Authenticate with Codacy by storing your API token |
| logout | Remove stored Codacy API token |
| info | Show authenticated user info and their organizations |
| repositories <provider> <org> | List repositories for an organization |
| `repositor