{"id":19081277,"url":"https://github.com/scolastico-dev/s.bitagent","last_synced_at":"2025-02-22T06:12:12.577Z","repository":{"id":224239818,"uuid":"762775120","full_name":"scolastico-dev/s.BitAgent","owner":"scolastico-dev","description":"*wip*","archived":false,"fork":false,"pushed_at":"2024-04-01T00:16:17.000Z","size":171,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-16T04:02:34.719Z","etag":null,"topics":["bitwarden","cli","ssh-agent","wrapper"],"latest_commit_sha":null,"homepage":"https://scolasti.co/go/s-bit-agent","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scolastico-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-24T16:53:14.000Z","updated_at":"2024-03-17T15:52:17.000Z","dependencies_parsed_at":"2024-02-24T18:43:49.521Z","dependency_job_id":"bbbcd00f-bf70-497d-9882-32237fbbbadf","html_url":"https://github.com/scolastico-dev/s.BitAgent","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"c9570aaf5839074f6672c49c33b9d99652308c71"},"previous_names":["scolastico-dev/s.bitagent"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scolastico-dev%2Fs.BitAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scolastico-dev%2Fs.BitAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scolastico-dev%2Fs.BitAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scolastico-dev%2Fs.BitAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scolastico-dev","download_url":"https://codeload.github.com/scolastico-dev/s.BitAgent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240131748,"owners_count":19752727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitwarden","cli","ssh-agent","wrapper"],"created_at":"2024-11-09T02:34:05.200Z","updated_at":"2025-02-22T06:12:12.548Z","avatar_url":"https://github.com/scolastico-dev.png","language":"TypeScript","readme":"# s.BitAgent\n\n*wip*\n\nA wrapper arround the Bitwarden CLI to provide a SSH Key Agent IPC interface.\n\n## Installation\n\n```bash\nnpm i -g s-bit-agent\ns-bit-agent -- bw config server https://\u003cyour-server\u003e\ns-bit-agent -- bw login\ns-bit-agent -- bw lock \u003ctoken from login\u003e\n```\n\nRun `s-bit-agent daemon` in autostart.\n\n```bash\ns-bit-agent setup # shows which automatic autostart installation is possible\ns-bit-agent daemon --help # See possible config options for the daemon\ns-bit-agent setup --type SystemdAutostartService --args \"--session-timeout 900\" # for example\n```\n\nAdd the socket to your `.bashrc` or `.profile`:\n```bash\nexport SSH_AUTH_SOCK=~/.ssh/s-bit-agent.sock\n```\n\n## Usage\n\n```bash\ns-bit-agent --help\ns-bit-agent -- bw --help\ns-bit-agent -- bwa --help\ns-bit-agent status\n```\n\n## Differences to `bw` and `bwa`\n\n```bash\nuser@example:~$ s-bit-agent -- bw status\n{..., \"status\": \"locked\"}\n\nuser@example:~$ s-bit-agent -- bwa status\nRequesting session\nConnected to server\nSent S_BIT_AGENT_REQUEST_SESSION\nReceived session\n{..., \"status\": \"unlocked\"}\n``` \n\n\n## TODO\n- [X] Add basic IPC communication to talk accordingly to [draft-miller-ssh-agent](https://datatracker.ietf.org/doc/html/draft-miller-ssh-agent)\n- [X] Add caching for the session\n- [X] add a `key add` command\n- [X] Add a `key import` command\n- [X] Add a `status` command\n- [X] Implement S_BIT_AGENT_REQUEST_SESSION into IPC\n- [X] Add a `bw` and `bwa` command\n- [X] Add a `setup` command to automatically install the daemon in the autostart\n- [X] Expand the S_BIT_AGENT_REQUEST_SESSION to also handle some other requests\n- [X] Add a public key local cache to speed up the key lookup, and reduce the password requests\n- [X] Handle detection of dead pipes and automatic removal of them\n- [X] Support for multiple IPC connections at once\n- [ ] Look into the secure heap implementation possibilitys\n- [ ] Add a `lock` command\n- [ ] Add setting to disable approval requests, or at least to set a timeout\n- [ ] Add a `key list` command\n- [ ] Add a `key delete` command\n- [ ] Add a `key rename` command\n- [ ] Add a `key export` command\n- [ ] Add tests\n- [ ] [Maybe™] Test or add support for windows.\n- [ ] [Maybe™] Develop a Tauri frontend/client, which internally uses the `s-bit-agent` to communicate with the server.\n- [ ] [Maybe™] Add capability to unlock the agent through bitwarden remote approval\n- [ ] [Maybe™] Add capability to unlock the agent through webauthn\n\n## Windows Support\n\nTheoretically, the agent should work on windows, but it is not tested.\nIf you want to help, please open an issue. If you encounter any problems,\ntry to use wsl, that should work.\n\nAlso if you do not use wsl, you will need to manually register the agent in\nthe autostart. Lastly as a tipp: you can modify the pipe name the daemon\ncreates, by passing the `SSH_AUTH_SOCK` environment variable to the daemon.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscolastico-dev%2Fs.bitagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscolastico-dev%2Fs.bitagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscolastico-dev%2Fs.bitagent/lists"}