Skip to content

Commit 1f7d7ca

Browse files
authored
Merge pull request #140 from MatrixAI/feature-polykey-cli-refresh
Feature polykey cli refresh
2 parents eedada2 + d07f2ee commit 1f7d7ca

File tree

18 files changed

+318
-421
lines changed

18 files changed

+318
-421
lines changed

docs/tutorials/polykey-cli/README.md renamed to docs/Getting-Started/polykey-cli/README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,31 @@ The CLI is open-source and available on GitHub:
3030

3131
Polykey is continuously built and tested on:
3232

33-
- Linux x64 / arm64
33+
- Linux x64
3434
- MacOS x64 / arm64
3535
- Windows x64
3636
- Docker
3737

38-
:::note Polykey is currently in beta. Its interface is at various levels of
39-
stability. So bear with us as we perfect its design. You can contribute by
40-
discussing with us on [Discord](https://discord.gg/h3UShM8WUN) or creating issue
41-
tickets in the
42-
[Polykey-CLI repo on GitHub](https://github.com/MatrixAI/Polykey-CLI). :::
38+
:::note Note
39+
40+
Polykey is currently in beta. Its interface is at various levels of stability.
41+
So bear with us as we perfect its design. You can contribute by discussing with
42+
us on [Discord](https://discord.gg/h3UShM8WUN) or creating issue tickets in the
43+
[Polykey-CLI repo on GitHub](https://github.com/MatrixAI/Polykey-CLI).
44+
45+
:::
4346

4447
## Getting Started
4548

4649
Start your journey with Polykey by following the tutorials below in sequence:
4750

48-
:::tip For a visual walkthrough, check out our
51+
:::tip Tip
52+
53+
For a visual walkthrough, check out our
4954
[getting started demo video](https://vimeo.com/884649667) after installing
50-
Polykey. :::
55+
Polykey.
56+
57+
:::
5158

5259
1. **[Installation](/docs/tutorials/polykey-cli/installation)** - Install
5360
Polykey CLI on your platform.

docs/tutorials/polykey-cli/bootstrapping.md renamed to docs/Getting-Started/polykey-cli/bootstrapping.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,20 @@ encryption and decryption of all node state and secret data managed by Polykey.
2424
You will be prompted to provide a root password. This password encrypts the root
2525
key.
2626

27-
:::note Remember to keep your password in a secure location as you will need it
28-
each time you start the Polykey agent. :::
27+
:::note Note
28+
29+
Remember to keep your password in a secure location as you will need it each
30+
time you start the Polykey agent.
31+
32+
:::
33+
34+
:::important
35+
36+
Bootstrapping also returns a **recovery code**. This code is required to recover
37+
a node with the same ID, so it is critical that you store it safely and
38+
securely. If lost, node identity recovery will not be possible.
39+
40+
:::
2941

3042
### Starting the Polykey Agent
3143

@@ -64,7 +76,8 @@ If the Polykey agent does not terminate properly, you can force quit the process
6476
through the Activity Monitor on your machine. If you encounter this or any other
6577
issue, please consider making a
6678
[bug report](https://github.com/MatrixAI/Polykey-CLI/issues/new/choose) to help
67-
improve Polykey.
79+
improve Polykey. Please make sure to check for existing issues before creating a
80+
new one.
6881

6982
## Check Agent Status
7083

@@ -80,19 +93,19 @@ including its connectivity and activity within the network.
8093
### Example Output
8194

8295
```bash
83-
status LIVE
84-
pid 96992
96+
sstatus LIVE
97+
pid 20004
8598
nodeId vgijtpv0h8m1eajeir77g73muq88n5kj0413t6fjdqsv9kt8dq4pg
86-
clientHost ::1
87-
clientPort 54975
99+
clientHost 127.0.0.1
100+
clientPort 51980
88101
agentHost ::
89-
agentPort 60358
90-
upTime 8
91-
startTime 1716509093
92-
connectionsActive 3
93-
nodesTotal 11
94-
version 1.2.3-alpha.4-1-1
95-
sourceVersion 1.2.3-alpha.4
102+
agentPort 58078
103+
upTime 120
104+
startTime 1742186927
105+
connectionsActive 0
106+
nodesTotal 2
107+
version 1.21.4-1-1
108+
sourceVersion 1.21.4
96109
stateVersion 1
97110
networkVersion 1
98111
```

docs/tutorials/polykey-cli/claiming-digital-identities.md renamed to docs/Getting-Started/polykey-cli/claiming-digital-identities.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Claiming Digital Identities: Establishing Identity Linkages in Polykey
1+
# Establishing Identity Linkages
22

33
In Polykey, claiming a digital identity is a crucial step that allows users to
44
establish their identity across various platforms and link these identities to
@@ -9,6 +9,8 @@ cryptographic link to a publicly verifiable location.
99
This tutorial will guide you through the steps to authenticate with GitHub and
1010
claim an identity using Polykey, enhancing security and streamlining identity
1111
verification, making it easier for other users to discover and trust your nodes.
12+
Currently, we only support github as an identity provider, but we plan to add
13+
more in the future.
1214

1315
## Step 1: Authenticate with GitHub
1416

@@ -31,8 +33,10 @@ polykey identities authenticate <providerId>
3133
`<providerId>`: The identifier for the digital identity provider, such as
3234
"github". :::
3335

34-
:::note Since Polykey currently only supports GitHub as an IdP, this is the
35-
command that you will use to start the authentication process.
36+
:::note Note
37+
38+
Since Polykey currently only supports GitHub as an IdP, this is the command that
39+
you will use to start the authentication process.
3640

3741
```bash
3842
polykey identities authenticate github
@@ -72,19 +76,19 @@ identityId maverick
7276
During the authentication process, here's what Polykey requests access to and
7377
why:
7478

75-
- **Create Gists:** Polykey creates a gist under your GitHub account containing
76-
a cryptographic link. This link is a verifiable method that proves the
77-
ownership of your GitHub identity to anyone checking your Polykey gestalt
79+
- **Currently: Create Gists:** Polykey creates a gist under your GitHub account
80+
containing a cryptographic link. This link is a verifiable method that proves
81+
the ownership of your GitHub identity to anyone checking your Polykey gestalt
7882
graph.
7983

80-
- **Read All User Profile Data:** This enables Polykey to access your profile
81-
details, including your username, followers, and public repository data. This
82-
information is used to ensure that the identity you claim corresponds
83-
accurately to your public digital footprint, enhancing trust and verification.
84+
-:::note Note
85+
86+
**Future Plan: Read All User Profile Data:** This enables Polykey to access your
87+
profile details, including your username, followers, and public repository data.
88+
This information is used to ensure that the identity you claim corresponds
89+
accurately to your public digital footprint, enhancing trust and verification.
8490

85-
- **Access User Email Addresses (read-only):** By accessing the email addresses
86-
associated with your account, Polykey can better manage notifications related
87-
to your secrets operations.
91+
:::
8892

8993
#### Security and Privacy Considerations
9094

@@ -150,6 +154,12 @@ This gist contains the cryptographic link confirming that your Polykey identity
150154
is correctly linked to your GitHub profile. Viewing this gist ensures your claim
151155
was successful and publicly verifiable.
152156

157+
:::note Note
158+
159+
This information should not be modified or the claim might be invalidated.
160+
161+
:::
162+
153163
## Understanding Gestalt Graphs
154164

155165
In Polykey, claiming identities creates a **gestalt graph**—a dynamic,

docs/tutorials/polykey-cli/discovering-other-users.md renamed to docs/Getting-Started/polykey-cli/discovering-other-users.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ polykey identities discover <gestaltId>
3939
polykey identities discover github.com:maverick
4040
```
4141

42-
This command adds the node associated with the GitHub username "maverick" to
43-
your discovery queue, allowing you to initiate interactions with this user.
44-
:::note
42+
:::note Note This command adds the node associated with the GitHub username
43+
"maverick" to your discovery queue, allowing you to initiate interactions with
44+
this user.
45+
46+
:::
4547

4648
## Troubleshooting Discovery and Connection Issues
4749

@@ -77,8 +79,6 @@ network.
7779

7880
:::
7981

80-
:::info
81-
8282
### Future Enhancements
8383

8484
Polykey is actively working to enhance the discovery process by implementing
@@ -116,12 +116,9 @@ Permissions in Polykey determine what actions a node or an identity can perform
116116
within the network. Here’s a general list of potential permissions that can be
117117
managed:
118118

119-
- **Read:** Allows viewing but not modifying.
120-
- **Write:** Allows both viewing and modifying.
121-
- **Execute:** Allows performing specific actions.
119+
- **Scan:** Allows the node to scan for vaults
122120
- **Notify:** Allows sending notifications about changes or updates.
123-
- **Trust:** Allows a node to be trusted, generally affecting how interactions
124-
are secured.
121+
- **Claim** Allows a different gstalt to claim the node
125122

126123
#### Example Command to Set Permissions
127124

@@ -197,8 +194,8 @@ polykey identities list
197194

198195
### Trusting and Untrusting Nodes
199196

200-
You can explicitly trust or untrust a node to refine how notifications and
201-
access controls are handled:
197+
You can explicitly trust or untrust individual nodes or entire gestalts to
198+
refine how notifications and access controls are handled:
202199

203200
```bash
204201
polykey identities trust <gestaltId>

docs/tutorials/polykey-cli/installation.md renamed to docs/Getting-Started/polykey-cli/installation.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ environment.
77

88
:::info
99

10-
Polykey-CLI has only been tested on Linux and macOS. We are working on
11-
supporting other platforms. There's minor teething problems when it comes
12-
supporting other platforms. Help us by reporting any issues with the CLI tool in
13-
our Github Repo
10+
## Polykey Core Overview
11+
12+
The Polykey CLI and core primarily use TypeScript for service logic, domain
13+
business operations, and persistence layers. While the main codebase is in
14+
TypeScript, some supporting libraries incorporate native C++ or Rust for
15+
platform‐specific functionality. This approach combines cross‐platform
16+
convenience with native performance optimizations. Polykey-CLI has only been
17+
tested on Linux and macOS. We are working on supporting other platforms. There's
18+
minor teething problems when it comes supporting other platforms. Help us by
19+
reporting any issues with the CLI tool in our Github Repo
1420
[here](https://github.com/MatrixAI/Polykey-CLI/issues/new/choose) or by dropping
1521
a message to the developers in our discord server
1622
[here](https://discord.gg/dC32r35TeE).
@@ -126,15 +132,15 @@ $ nix-env -f ./release.nix --install --attr application --argstr npmDepsHash "$(
126132
We will be working on other distribution methods.
127133

128134
</TabItem>
129-
<TabItem value="macos" label="MacOs">
135+
<TabItem value="macOS" label="MacOS">
130136

131137
## MacOS
132138

133139
:::info
134140

135-
ARM-64 builds are not currently supported on MacOS as of **26-03-24.** However,
136-
building Polykey yourself on MacOS resolves in a working binary. Follow this
137-
guide below to manually build and install Polykey on macOS.
141+
ARM-64 builds are not currently supported on MacOS as of **6 April 2025.**
142+
However, building Polykey yourself on MacOS resolves in a working binary. Follow
143+
this guide below to manually build and install Polykey on macOS.
138144

139145
:::
140146

@@ -284,13 +290,21 @@ echo 'export PATH=~/Downloads:$PATH' >> ~/.zshrc && source ~/.zshrc
284290
</TabItem>
285291
<TabItem value="bash" label="Bash">
286292

293+
:::tip
294+
295+
The path export should not pint to the Polykey executable itself, but rather to
296+
the directory containing the executable. Otherwise, the executable will not be
297+
found and will not work.
298+
299+
:::
300+
287301
#### For Bash:
288302

289303
1. `cd` into the directory where the "polykey" executable is stored.
290304
2. Edit the Bash config to add "polykey" to your path. To streamline the
291305
process, run the following command, making sure to change the path to
292306
"polykey" if the executable is not in the downloads folder. For most users,
293-
this would be `~/downloads` on Debian-based systems.
307+
this would be `~/Downloads`
294308

295309
:::tip
296310

@@ -408,7 +422,7 @@ docker run -it 0e1addd9855a agent start --background -np /tmp/polykey
408422
Making sure to replace `0e1addd9855a` with your corresponding image ID.
409423

410424
```shell
411-
docker run -it 0e1addd9855a agent start --background -np /tmp/polykey
425+
$ docker run -it 0e1addd9855a agent start --background -np /tmp/polykey
412426
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
413427
✔ Enter new password … *
414428
✔ Confirm new password … *
@@ -418,7 +432,7 @@ clientHost 127.0.0.1
418432
clientPort 45509
419433
agentHost ::
420434
agentPort 37468
421-
recoveryCode net elephant gentle eight pulp oyster panther sing own autumn silly whip simple warfare daughter pepper detail bachelor awkward forget ignore cream silly raw
435+
recoveryCode (random text recovery code goes here)
422436
423437
```
424438
@@ -433,7 +447,7 @@ The CLI is published as
433447
Install it with:
434448
435449
```sh
436-
npm install -g polykey-cli
450+
npm install polykey
437451
```
438452
439453
This will install the Polykey-CLI into the path pointed to by the command

docs/tutorials/polykey-cli/managing-multiple-nodes.md renamed to docs/Getting-Started/polykey-cli/managing-multiple-nodes.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ node we are starting an agent for. If unsure of the syntax to use for command
4141
operations, adding the --help at the end of each subcommand provides useful
4242
context.
4343

44-
:::note If a node has not been created before, initializing the Polykey agent
45-
for it will also initiate the bootstrap process. :::
44+
:::note Note
45+
46+
If a node has not been created before, initializing the Polykey agent for it
47+
will also initiate the bootstrap process.
48+
49+
:::
4650

4751
When working with multiple nodes, specifying the node path in each command can
4852
become cumbersome. To streamline this process in your terminal shell session,
@@ -69,7 +73,7 @@ specify a node path, so it automatically targets the default node path.
6973
**Shell B (for your new node, nodeB):**
7074

7175
```bash
72-
polykey agent super_start --node-path ./nodeB --background
76+
polykey agent start --node-path ./nodeB --background
7377
```
7478

7579
This command starts a new Polykey agent for nodeB in the background. The first

0 commit comments

Comments
 (0)