Linearis is a CLI tool for Linear.app that compiles from TypeScript to JavaScript during installation. It runs on Node.js 22+ and outputs JSON for all commands.
Clone and install:
git clone https://github.com/linearis-oss/linearis.git
cd linearis
npm installnpm install handles the full setup automatically:
postinstallrunsnpm run generate(GraphQL codegen)prepareis not used; build manually withnpm run build
After building, link the CLI globally:
npm run build
npm linkThis creates the linearis command, pointing to dist/main.js.
npm install git+https://github.com/linearis-oss/linearis.gitThis runs postinstall to generate GraphQL types. You still need to run npm run build separately to compile TypeScript.
| Command | Description |
|---|---|
npm run generate |
Generate GraphQL types from schema |
npm run build |
Compile TypeScript and make entry executable |
npm run clean |
Remove dist/ directory (rm -rf dist/) |
npm run start |
Run in development mode via tsx |
npm test |
Run test suite |
The build script runs tsc && chmod +x dist/main.js. The clean script uses rm -rf dist/.
For interactive use (humans), run linearis auth login — it opens Linear in the browser and stores the token encrypted in ~/.linearis/token.
Linearis checks for an API token in this order:
--api-tokenflag on the command lineLINEAR_API_TOKENenvironment variable~/.linearis/token(encrypted, set up vialinearis auth login)~/.linear_api_token(deprecated)
For automated environments (CI, containers), set the environment variable.
Authentication is handled in src/common/auth.ts and src/common/token-storage.ts.
- Node.js >= 22.0.0
- ES modules support (package uses
"type": "module") - Works on Linux, macOS, and Windows
- The token file path resolves via
os.homedir(), so it works across platforms ($HOMEon Unix,%USERPROFILE%on Windows)
Example Dockerfile:
FROM node:22-alpine
WORKDIR /app
COPY package.json package-lock.json tsconfig.json codegen.config.ts ./
COPY src/ ./src/
COPY graphql/ ./graphql/
RUN npm install
ENTRYPOINT ["node", "dist/main.js"]npm install triggers postinstall (which runs npm run generate). The graphql/ directory is required because codegen reads the query and mutation definitions from it. Run npm run build separately to compile TypeScript.
Pass the API token as an environment variable:
docker build -t linearis .
docker run -e LINEAR_API_TOKEN=lin_api_... linearis issue listMissing dist/ directory -- Run npm run build to compile TypeScript.
GraphQL type errors after schema changes -- Run npm run generate to regenerate types.
Node.js version mismatch -- Verify you have Node.js 22.0.0 or later with node --version.
Command not found after npm link -- Make sure npm run build completed successfully and dist/main.js exists.
Authentication failures -- Confirm your Linear API token is valid and provided through one of the three supported methods.
Current version: 2026.4.1 (defined in package.json).