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.
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
- 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>
- List your projects:
linear projects list
- Set a default project (optional):
linear projects set-default <project-name-or-id>
- 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
- 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"
- 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 passwordlinear auth login --api-key <api-key>: Log in with an API keylinear auth logout: Log out from Linear
Projects
linear projects list: List all projectslinear projects set-default <project>: Set the default project for issue creation and listinglinear projects get-default: Show the current default projectlinear 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 projectlinear 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
- Clone the repository:
git clone https://github.com/royreznik/linear-cli.git
cd linear-cli
- 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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
- Update the version in
pyproject.toml - Create a new tag with the version number:
git tag v0.1.0 git push origin v0.1.0
- Go to the GitHub repository and create a new release using the tag
- The GitHub Action will automatically build and publish the package to PyPI
Option 2: Manual Dispatch
- Update the version in
pyproject.toml - Commit and push your changes
- Go to the GitHub repository's Actions tab
- Select the "Publish to PyPI" workflow
- Click "Run workflow"
- Enter the version number (e.g., 0.1.0) and click "Run workflow"
- 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:
- Generate an API token on PyPI (https://pypi.org/manage/account/token/)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efbe317af8a23a1b6c21f0499d509c4f70abe689ce08842b427f0107e56cb33f
|
|
| MD5 |
5dbcebe2f65974bb0dfb44f454ff493e
|
|
| BLAKE2b-256 |
db3108fe1dd4c9f7f5e6345f67b394653fb3ecc1bbba446f8ba1e7c413904105
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c74863aa0dbbfabd3b7e10ea41816c2ab58805e1e04c6bdbcab9cbaa8d5d385d
|
|
| MD5 |
23521d40124ff0dc1f213606b79c0dc3
|
|
| BLAKE2b-256 |
251ac8583920876525b81e29f235a7843d5859b6a95e0ff7806a323f09dc7314
|