Skip to main content

A command-line interface for interacting with the Linear.app API

Project description

Linear CLI

A command-line interface for interacting with the Linear.app API.

CI Publish

Features

  • Authenticate with Linear using your email and password or API key
  • List projects and issues
  • Create new issues
  • Set a default project for issue creation and listing
  • View your profile information
  • Rich terminal output with colors and formatting

Installation

Using uv (recommended)

uv pip install linear-app-cli

From source

git clone https://github.com/royreznik/linear-cli.git
cd linear-cli
uv pip install -e .

Quick Start

  1. Authenticate with Linear:
# Using interactive prompt for email and password
linear auth login

# Or using an API key
linear auth login --api-key <your-api-key>
  1. List your projects:
linear projects list
  1. Set a default project (optional):
linear projects set-default <project-name-or-id>
  1. List issues for a specific project (or default project if set):
# For a specific project
linear issues list --project <project-name-or-id>

# For the default project (if set)
linear issues list
  1. Create a new issue:
# For a specific project
linear issues create --title "New Issue" --description "Description" --project <project-name-or-id>

# For the default project (if set)
linear issues create --title "New Issue" --description "Description"
  1. View your profile:
linear me

Commands

Authentication

  • linear auth login: Log in to Linear with your email and password (interactive prompt)
  • linear auth login --email <email> --password <password>: Log in with email and password
  • linear auth login --api-key <api-key>: Log in with an API key
  • linear auth logout: Log out from Linear

Projects

  • linear projects list: List all projects
  • linear projects set-default <project>: Set the default project for issue creation and listing
  • linear projects get-default: Show the current default project
  • linear projects clear-default: Clear the default project

Issues

  • linear issues list: List all issues (uses default project if set)
  • linear issues list --project <id-or-name>: List issues for a specific project
  • linear issues create --title <title> --description <desc>: Create a new issue (uses default project if set)
  • linear issues create --title <title> --description <desc> --project <id-or-name>: Create a new issue for a specific project

User

  • linear me: Show your Linear profile

Global Options

  • --timeout <seconds>: Set request timeout in seconds
  • --version: Show version information
  • --help: Show help information

Development

Setup

  1. Clone the repository:
git clone https://github.com/royreznik/linear-cli.git
cd linear-cli
  1. Install development dependencies:
uv pip install -e ".[dev]"

Testing

Run tests with pytest:

pytest

Run tests with coverage:

pytest --cov=linear_cli

Linting

Run ruff:

ruff check .

Run mypy:

mypy linear_cli

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please make sure your code passes all tests and linting checks.

Releasing

This project uses GitHub Actions to automatically build and publish the package to PyPI when a new release is created or when manually triggered.

Creating a Release

Option 1: Create a GitHub Release

  1. Update the version in pyproject.toml
  2. Create a new tag with the version number:
    git tag v0.1.0
    git push origin v0.1.0
    
  3. Go to the GitHub repository and create a new release using the tag
  4. The GitHub Action will automatically build and publish the package to PyPI

Option 2: Manual Dispatch

  1. Update the version in pyproject.toml
  2. Commit and push your changes
  3. Go to the GitHub repository's Actions tab
  4. Select the "Publish to PyPI" workflow
  5. Click "Run workflow"
  6. Enter the version number (e.g., 0.1.0) and click "Run workflow"
  7. The GitHub Action will build and publish the package to PyPI

PyPI Configuration

To publish to PyPI, you need to add a PyPI API token as a GitHub secret:

  1. Generate an API token on PyPI (https://pypi.org/manage/account/token/)
  2. Add the token as a secret in your GitHub repository with the name PYPI_API_TOKEN

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linear_app_cli-0.1.2.tar.gz (63.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linear_app_cli-0.1.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file linear_app_cli-0.1.2.tar.gz.

File metadata

  • Download URL: linear_app_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 63.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for linear_app_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 efbe317af8a23a1b6c21f0499d509c4f70abe689ce08842b427f0107e56cb33f
MD5 5dbcebe2f65974bb0dfb44f454ff493e
BLAKE2b-256 db3108fe1dd4c9f7f5e6345f67b394653fb3ecc1bbba446f8ba1e7c413904105

See more details on using hashes here.

File details

Details for the file linear_app_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: linear_app_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for linear_app_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c74863aa0dbbfabd3b7e10ea41816c2ab58805e1e04c6bdbcab9cbaa8d5d385d
MD5 23521d40124ff0dc1f213606b79c0dc3
BLAKE2b-256 251ac8583920876525b81e29f235a7843d5859b6a95e0ff7806a323f09dc7314

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page