Skip to content

feat: Add CLI tool with full glab auth login options and use command-stream#4

Merged
konard merged 4 commits intomainfrom
issue-3-e87aeca07ea0
Jan 14, 2026
Merged

feat: Add CLI tool with full glab auth login options and use command-stream#4
konard merged 4 commits intomainfrom
issue-3-e87aeca07ea0

Conversation

@konard
Copy link
Member

@konard konard commented Jan 13, 2026

Summary

  • Restructured README.md to match gh-setup-git-identity format with "Instead of manually running" section at the start
  • Created full CLI tool (src/cli.js) with all glab auth login options
  • Refactored src/index.js to use command-stream library for all CLI calls
  • Added lino-arguments for CLI argument parsing with environment variable support
  • Updated TypeScript definitions with new options

Changes

CLI Options Added

All glab auth login options are now passable via CLI:

  • --hostname - GitLab hostname
  • --token, -t - GitLab access token
  • --stdin - Read token from standard input
  • --git-protocol, -p - Protocol for git operations (ssh, https, http)
  • --api-protocol - Protocol for API calls (https, http)
  • --api-host - Custom API host URL
  • --use-keyring - Store token in system keyring
  • --job-token, -j - CI job token for authentication

Dependencies Added

  • command-stream - For executing shell commands
  • lino-arguments - For CLI argument parsing
  • yargs - Required by lino-arguments

Files Modified

  • README.md - Complete restructure following gh-setup-git-identity format
  • src/cli.js - New CLI entry point
  • src/index.js - Refactored to use command-stream
  • src/index.d.ts - Updated TypeScript definitions
  • package.json - Added bin entry and new dependencies
  • tests/index.test.js - Added apiProtocol test

Test plan

  • All 13 unit tests pass
  • ESLint passes with no warnings
  • Prettier formatting verified
  • CI checks pass

Fixes #3

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #3
@konard konard self-assigned this Jan 13, 2026
…stream

- Add glab-setup-git-identity CLI command that can be run globally
- Support all glab auth login options: --hostname, --token, --stdin,
  --git-protocol, --api-protocol, --api-host, --use-keyring, --job-token
- Update README.md to match gh-setup-git-identity structure with
  "Instead of manually running" section at the start
- Refactor library to use command-stream for shell command execution
- Add lino-arguments dependency for CLI argument parsing
- Update TypeScript definitions with new options (apiProtocol, apiHost,
  jobToken, stdin)
- Add test for apiProtocol default option

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] Make README.md more similar to https://github.com/link-foundation/gh-setup-git-identity feat: Add CLI tool with full glab auth login options and use command-stream Jan 13, 2026
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 13, 2026 21:54
@konard
Copy link
Member Author

konard commented Jan 13, 2026

⚠️ Solution Draft Finished with Errors

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $6.738037 USD
  • Calculated by Anthropic: $0.000000 USD
  • Difference: $-6.738037 (-100.00%)

Note: The session encountered errors during execution, but some work may have been completed. Please review the changes carefully.

📎 Log file uploaded as Gist (890KB)
🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 2cafca9 into main Jan 14, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make README.md more similar to https://github.com/link-foundation/gh-setup-git-identity

1 participant