Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run format:check

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run test:coverage
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: coverage/

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: dist
path: packages/*/dist/
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org

- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npm run test
- run: npm run build

- name: Publish to npm
run: npm publish --workspaces --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
51 changes: 0 additions & 51 deletions .gitlab-ci.yml

This file was deleted.

9 changes: 7 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
{
"name": "@clux/cli",
"version": "0.1.0",
"private": true,
"license": "MIT",
"main": "dist/index.js",
"bin": {
"clux": "dist/index.js"
},
"files": ["dist"],
"repository": {
"type": "git",
"url": "https://github.com/michalsikora/clux.git",
"directory": "packages/cli"
},
"scripts": {
"build": "tsc",
"watch": "tsc --watch",
"start": "node dist/index.js"
},
"dependencies": {
"@clux/core": "*",
"@clux/core": "0.1.0",
"commander": "^13.0.0",
"chalk": "^4.1.2",
"cli-table3": "^0.6.5",
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/commands/claude.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ describe('buildSessionName', () => {
});

it('generates name from path when no name provided', () => {
expect(buildSessionName(undefined, '/home/user/projects/clux')).toBe('claude_h-u-projects-clux');
expect(buildSessionName(undefined, '/home/user/projects/clux')).toBe(
'claude_h-u-projects-clux',
);
});

it('generates name for short paths', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.description('Create a new tmux session')
.option('-p, --path <path>', 'Project working directory', process.cwd())
.option('-c, --command <cmd>', 'Command to run in main pane (e.g. "claude")')
.option('-l, --layout <layout>', 'Pane layout', 'tiled')
.option('-l, --layout <layout>', 'Pane layout', 'tiled')
.option('-d, --description <text>', 'Session description')
.option('-t, --tags <tags>', 'Comma-separated tags')
.action(async (name: string, opts) => {
Expand All @@ -36,7 +36,7 @@
spinner.succeed(chalk.green(`Session "${session.name}" created`));
printSessionDetails(session);
console.log(chalk.dim(`\n Attach with: clux attach ${session.name}`));
} catch (err: any) {

Check warning on line 39 in packages/cli/src/commands/create.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
spinner.fail(chalk.red(err.message));
process.exit(1);
}
Expand Down
7 changes: 6 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"name": "@clux/core",
"version": "0.1.0",
"private": true,
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"repository": {
"type": "git",
"url": "https://github.com/michalsikora/clux.git",
"directory": "packages/core"
},
"scripts": {
"build": "tsc",
"watch": "tsc --watch"
Expand Down
8 changes: 3 additions & 5 deletions packages/core/src/TmuxControlClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ export class TmuxControlClient extends EventEmitter {
await this.refreshPaneMap();

return new Promise<void>((resolve, reject) => {
this.proc = spawn(
'tmux',
['-C', 'attach-session', '-t', this.sessionName, '-r'],
{ stdio: ['pipe', 'pipe', 'pipe'] },
);
this.proc = spawn('tmux', ['-C', 'attach-session', '-t', this.sessionName, '-r'], {
stdio: ['pipe', 'pipe', 'pipe'],
});

let settled = false;

Expand Down
9 changes: 7 additions & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"name": "@clux/web",
"version": "0.1.0",
"private": true,
"license": "MIT",
"main": "dist/server.js",
"files": ["dist"],
"repository": {
"type": "git",
"url": "https://github.com/michalsikora/clux.git",
"directory": "packages/web"
},
"scripts": {
"build": "tsc",
"dev": "node dist/server.js",
"watch": "tsc --watch"
},
"dependencies": {
"@clux/core": "*",
"@clux/core": "0.1.0",
"express": "^4.21.0",
"ws": "^8.18.0"
},
Expand Down
Loading