Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 565ee91

Browse files
committed
upgrade: update secman module name, upgrade go to 1.18, build secman hub
1 parent 9ff54e2 commit 565ee91

File tree

151 files changed

+344
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+344
-409
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG VARIANT=1.17
1+
ARG VARIANT=1.18
22
ARG NODE_VERSION="16"
33

44
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"build": {
44
"dockerfile": "Dockerfile",
55
"args": {
6-
"VARIANT": "1.17",
6+
"VARIANT": "1.18",
77
"NODE_VERSION": "16"
88
}
99
},

.github/CONTRIBUTING.md

+33-7
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,42 @@ We'd also love to hear about ideas for new features as issues or discussions.
1313

1414
## Build Secman
1515

16-
### Prerequisites:
16+
## Prerequisites:
1717

18-
- `go` version >= `13`
19-
- `npm` version >= `8.0.0`
18+
- `go` version >= `17`.
19+
- `npm` version >= `8.0.0`.
20+
- `yarn` is installed.
21+
- [`task`](https://taskfile.dev) is installed.
2022

21-
### Run
23+
## Clone secman repo
2224

23-
* run **task build** to build secman cli.
24-
* run **task link** to link to secman core cli and test it.
25-
* run **task install** to setup secman and use it.
25+
```bash
26+
# GitHub CLI
27+
$ gh repo clone scmn-dev/secman
28+
29+
# Git
30+
$ git clone https://github.com/scmn-dev/secman
31+
```
32+
33+
## Change directory to secman repo
34+
35+
```bash
36+
$ cd secman
37+
```
38+
39+
### Build secman
40+
41+
- run **task bfs** to build secman cli.
42+
43+
```bash
44+
$ task bfs
45+
```
46+
47+
### Check secman
48+
49+
```bash
50+
$ secman version
51+
```
2652

2753
## Create or submitting a pull request
2854

.github/workflows/build-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@v2
2424
with:
25-
go-version: 1.17
25+
go-version: 1.18
2626

2727
- name: Set up `Task`
2828
uses: arduino/setup-task@v1
@@ -44,7 +44,7 @@ jobs:
4444
- name: Set up Go
4545
uses: actions/setup-go@v2
4646
with:
47-
go-version: 1.17
47+
go-version: 1.18
4848

4949
- name: Set up `Task`
5050
uses: arduino/setup-task@v1

.github/workflows/go.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v2
1717
with:
18-
go-version: 1.17
18+
go-version: 1.18
1919

2020
- name: Build
2121
run: |
22-
go mod tidy -compat=1.17
22+
go mod tidy -compat=1.18
2323
go run ./scripts/date.go >> date.txt
2424
go build -ldflags "-X main.version=$(git describe --abbrev=0 --tags) -X main.buildDate=$(cat date.txt)" -o tran
2525

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go
2424
uses: actions/setup-go@v2
2525
with:
26-
go-version: 1.17
26+
go-version: 1.18
2727

2828
- name: Setup Node.js
2929
uses: actions/setup-node@v2.5.0

.goreleaser.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ release:
1010

1111
before:
1212
hooks:
13-
- go mod tidy -compat=1.17
13+
- go mod tidy -compat=1.18
1414

1515
builds:
1616
- <<: &build_defaults

README.md

+38-152
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,41 @@
1-
# Secman CLI
1+
<p align="center">
2+
<a href="https://secman.dev/#gh-light-mode-only" target="_blank">
3+
<img src="https://assets.secman.dev/logo.svg" alt="Secman" width="300">
4+
</a>
5+
<a href="https://secman.dev/#gh-dark-mode-only" target="_blank">
6+
<img src="https://assets.secman.dev/logo_w.svg" alt="Secman" width="300">
7+
</a>
8+
</p>
29

3-
[**secman cli**](https://secman.dev) is a TUI password manager can store, retrieves, generates, and synchronizes passwords, The most important difference is secman is not GPG cored. Instead, it uses a master password to securely store your passwords. and you can easily manage your passwords from everywhere with **Secman Cloud** 😉.
10+
[**secman**][smweb] is a password manager can store, retrieves, generates, and synchronizes passwords, The most important difference is secman is not GPG cored. Instead, it uses a master password to securely store your passwords. and you can easily manage your passwords from everywhere with **Secman Cloud** 😉.
411

5-
<img src="https://assets.secman.dev/apps/secman-cli.svg" />
12+
<p align="center">
13+
<img src="https://raw.githubusercontent.com/scmn-dev/.github/main/assets/secman.svg" />
14+
</p>
615

7-
### Featuers
16+
## Projects
17+
18+
| Project | Package | Version | Links |
19+
| ----------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
20+
| **CLI** | [`scmn-dev/secman`](https://pkg.go.dev/github.com/scmn-dev/secman/v6) | ![version](https://img.shields.io/github/v/release/scmn-dev/secman?label=go%40latest&logo=go&style=flat-square) | [`README.md`](README.md) |
21+
| **Core** | [`@secman/core`](https://github.com/scmn-dev/secman/tree/main/core) | ![version)](https://img.shields.io/github/package-json/v/scmn-dev/secman?color=blue&filename=core%2Fpackage.json&label=npm%40latest&logo=npm&logoColor=blue&style=flat-square) | [`README.md`](core/README.md) |
22+
| **Hub** | [`@secman/hub`](https://github.com/scmn-dev/secman/tree/main/hub) | ![version](https://img.shields.io/github/package-json/v/scmn-dev/secman?filename=hub%2Fpackage.json&label=npm%40latest&logo=npm&style=flat-square) | [`README.md`](hub/README.md) |
23+
| **Crypto** | [`@secman/crypto`](https://github.com/scmn-dev/secman/tree/main/crypto) | ![version)](https://img.shields.io/github/package-json/v/scmn-dev/secman?color=blue&filename=crypto%2Fpackage.json&label=npm%40latest&logo=npm&logoColor=blue&style=flat-square) | [`README.md`](crypto/README.md) |
24+
25+
## Featuers
826

927
- **Not GPG cored.**
1028
- **It uses a master password to securely store your passwords.**
1129
- **It syncs your passwords.**
1230
- **Easy to use.**
13-
- **It is written in Go.**
14-
- **You can easily manage your passwords from everywhere, from desktop, web, terminal, and more.**
31+
- **It is written in Go to be fast.**
32+
- **You can easily manage your passwords from everywhere, from desktop, web, command line, and more.**
33+
34+
#### to learn about secman types, check out the [secman types](https://secman.dev/docs/password-types) page.
1535

16-
### Installation ⬇
36+
## Installation ⬇
37+
38+
> ### Secman CLI
1739
1840
### Using script
1941

@@ -44,161 +66,26 @@ scoop bucket add secman https://github.com/scmn-dev/scoop
4466
scoop install secman
4567
```
4668

47-
## Usage
48-
49-
##### to learn about secman types, check out the [secman types](https://secman.dev/docs/password-types) page.
50-
51-
### Initialize `~/.secman`
52-
53-
**Command**
54-
55-
```
56-
secman init
57-
```
58-
59-
**Flags**
60-
61-
no flags
62-
63-
### Manage secman's authentication state.
64-
65-
**Command**
66-
67-
```
68-
secman auth
69-
```
70-
71-
**Other Commands**
72-
73-
```
74-
create Create a new secman account.
75-
login Authenticate with secman.
76-
logout Logout of the current user account.
77-
refresh Refresh the current user account.
78-
```
79-
80-
**Flags**
81-
82-
no flags
83-
84-
### Insert a New Password
85-
86-
**Command**
87-
88-
```
89-
secman insert --[PASSWORD_TYPE]
90-
```
91-
92-
**Flags**
93-
94-
```
95-
-c, --credit-cards Insert a credit card to your vault.
96-
-e, --emails Insert a email to your vault.
97-
-l, --logins Insert a login password to your vault.
98-
-n, --notes Insert a note to your vault.
99-
-s, --servers Insert a server to your vault.
100-
```
101-
102-
### List all your passwords
103-
104-
**Command**
105-
106-
```
107-
secman .
108-
```
109-
110-
**Flags**
111-
112-
no flags
113-
114-
### Read a password
115-
116-
**Command**
117-
118-
```
119-
secman read --[PASSWORD_TYPE] <PASSWORD_NAME>
120-
```
121-
122-
**Flags**
123-
124-
```
125-
-c, --credit-cards Read password from credit cards type.
126-
-e, --emails Read password from emails type.
127-
-j, --json Print password in JSON view.
128-
-l, --logins Read password from logins type.
129-
-n, --notes Read password from notes type.
130-
-s, --servers Read password from servers type.
131-
-p, --show-hidden Show hidden values.
132-
```
133-
134-
### Update/Edit a password value
135-
136-
**Command**
137-
138-
```
139-
secman edit --[PASSWORD_TYPE] <PASSWORD_NAME>
140-
```
141-
142-
**Flags**
143-
144-
```
145-
-c, --credit-cards Edit password from credit cards type.
146-
-e, --emails Edit password from emails type.
147-
-l, --logins Edit password from logins type.
148-
-n, --notes Edit password from notes type.
149-
-s, --servers Edit password from servers type.
150-
```
151-
152-
### Delete a password
153-
154-
**Command**
155-
156-
```
157-
secman delete --[PASSWORD_TYPE] <PASSWORD_NAME>
158-
```
159-
160-
**Flags**
69+
> ### Secman Hub
16170
162-
```
163-
-c, --credit-cards Delete password from credit cards type.
164-
-e, --emails Delete password from emails type.
165-
-l, --logins Delete password from logins type.
166-
-n, --notes Delete password from notes type.
167-
-s, --servers Delete password from servers type.
168-
```
71+
Refer to [secman hub](https://secman.dev/docs/hub) for instructions.
16972

170-
### Generate a password
73+
> ### Secman Web Extension
17174
172-
**Command**
75+
Check out [secman web extension](https://secman.dev/docs/extension) for installation instructions.
17376

174-
```
175-
secman generate --length 20
176-
```
177-
178-
**Flags**
179-
180-
```
181-
-l, --length int Set the length of the password. (default 10)
182-
-r, --raw Generate a password and print it.
183-
```
184-
185-
> to learn more about secman commands run `secman help`
77+
## Usage
18678

18779
## Some Resources
18880

189-
- [**secman website**][smweb]
81+
- [**website**][smweb]
19082
- [**docs**](https://secman.dev/docs)
191-
- [**changelog**](https://secman.dev/changelog)
83+
- [**blog**](https://secman.dev/blog)
19284
- [**privacy policy of secman**](https://secman.dev/privacy)
19385

194-
## Other Secman Products
195-
196-
- [**Secman Desktop**](https://github.com/scmn-dev/desktop)
197-
- [**Secman Extension**](https://secman.dev/extension)
198-
19986
## Contributing
20087

201-
Thanks for your interest in contributing to `secman`. You can start a development environment with [gitpod](https://www.gitpod.io):
88+
Thanks for your interest in contributing to `secman`. You can start a development environment with [gitpod](https://www.gitpod.io)
20289

20390
[![open in gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/scmn-dev/secman)
20491

@@ -208,7 +95,6 @@ thanks to [**@charmbracelet**](https://github.com/charmbracelet) for thier aweso
20895

20996
## License
21097

211-
[**secman**][smweb] is licensed under the terms of [MIT][licurl] License
98+
[**secman**][smweb] is licensed under the terms of [MIT][https://github.com/scmn-dev/secman/blob/main/LICENSE] License
21299

213100
[smweb]: https://secman.dev
214-
[licurl]: https://github.com/scmn-dev/secman/blob/main/LICENSE

Taskfile.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tasks:
2929
build:
3030
cmds:
3131
- task: set-tag-and-date
32-
- go mod tidy -compat=1.17
32+
- go mod tidy -compat=1.18
3333
- go build -ldflags "-X main.version=$(cat tag.txt) -X main.buildDate=$(cat date.txt)" -o secman
3434

3535
build-core:
@@ -58,4 +58,4 @@ tasks:
5858
- task: build
5959
- task: build-core
6060
- task: link-core
61-
- sudo mv ./secman "{{ .SECMAN_UNIX_PATH }}"
61+
- task: install

app/auth.go cli/auth.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
package app
1+
package cli
22

33
import (
4-
"os"
54
"fmt"
6-
"strings"
75
"io/ioutil"
6+
"os"
7+
"strings"
88

99
"github.com/abdfnx/gosh"
10-
"github.com/spf13/cobra"
11-
"github.com/scmn-dev/browser"
12-
"github.com/charmbracelet/lipgloss"
13-
"github.com/scmn-dev/secman/constants"
1410
tea "github.com/charmbracelet/bubbletea"
15-
"github.com/scmn-dev/secman/pkg/auth/login"
16-
"github.com/scmn-dev/secman/internal/shared"
17-
"github.com/scmn-dev/secman/pkg/auth/logout"
18-
"github.com/scmn-dev/secman/pkg/auth/refresh"
11+
"github.com/charmbracelet/lipgloss"
12+
"github.com/scmn-dev/browser"
13+
"github.com/scmn-dev/secman/v6/constants"
14+
"github.com/scmn-dev/secman/v6/internal/shared"
15+
"github.com/scmn-dev/secman/v6/pkg/auth/login"
16+
"github.com/scmn-dev/secman/v6/pkg/auth/logout"
17+
"github.com/scmn-dev/secman/v6/pkg/auth/refresh"
18+
"github.com/spf13/cobra"
1919
)
2020

2121
func AuthCMD() *cobra.Command {

0 commit comments

Comments
 (0)