You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Write.as Command-Line Interface (CLI) is a cross-platform tool for publishing text to [Write.as](https://write.as) and its other sites, like [Paste.as](https://paste.as). It is designed to be simple, scriptable, do one job (publishing) well, and work as you'd expect with other command-line tools.
3
+
**This has been split into two user guides:**
4
4
5
-
Write.as is a text-publishing service that protects your privacy. There's no sign up required to publish, but if you do sign up, you can access posts across devices and compile collections of them in what most people would call a "blog".
5
+
## Write.as CLI
6
+
See full usage documentation on our [writeas-cli User Guide](https://github.com/writeas/writeas-cli/blob/master/cmd/writeas/GUIDE.md).
6
7
7
-
## Uses
8
-
9
-
These are a few common uses for `writeas`. If you get stuck or want to know more, run `writeas [command] --help`. If you still have questions, [ask us](https://write.as/contact).
post Alias for default action: create post from stdin
18
-
new Compose a new post from the command-line and publish
19
-
publish Publish a file to Write.as
20
-
delete Delete a post
21
-
update Update (overwrite) a post
22
-
get Read a raw post
23
-
add Add an existing post locally
24
-
posts List all of your posts
25
-
claim Claim local unsynced posts
26
-
blogs List blogs
27
-
claim Claim local unsynced posts
28
-
auth Authenticate with Write.as
29
-
logout Log out of Write.as
30
-
help, h Shows a list of commands or help for one command
31
-
32
-
GLOBAL OPTIONS:
33
-
-c value, -b value Optional blog to post to
34
-
--tor, -t Perform action on Tor hidden service
35
-
--tor-port value Use a different port to connect to Tor (default: 9150)
36
-
--code Specifies this post is code
37
-
--md Returns post URL with Markdown enabled
38
-
--verbose, -v Make the operation more talkative
39
-
--font value Sets post font to given value (default: "mono")
40
-
--lang value Sets post language to given ISO 639-1 language code
41
-
--user-agent value Sets the User-Agent for API requests
42
-
--host value, -H value Operate against a custom hostname
43
-
--user value, -u value Use authenticated user, other than default
44
-
--help, -h show help
45
-
--version, -V print the version
46
-
```
47
-
48
-
> Note: the host and user flags are only available in `writefreely`.
49
-
50
-
#### Share something
51
-
52
-
By default, `writeas` creates a post with a `monospace` typeface that doesn't word wrap (scrolls horizontally). It will return a single line with a URL, and automatically copy that URL to the clipboard:
53
-
54
-
```bash
55
-
$ echo"Hello world!"| writeas
56
-
https://write.as/aaaazzzzzzzza
57
-
```
58
-
59
-
This is generally more useful for posting terminal output or code, like so (the `--code` flag turns on syntax highlighting):
This will authenticate with write.as and store the user access token locally, until you explicitly logout.
77
-
```bash
78
-
$ writeas auth username
79
-
Password: ************
80
-
```
81
-
82
-
#### List all blogs
83
-
84
-
This will output a list of the authenticated user's blogs.
85
-
```bash
86
-
$ writeas blogs
87
-
Alias Title
88
-
user An Example Blog
89
-
dev My Dev Log
90
-
```
91
-
92
-
#### List posts
93
-
94
-
This lists all anonymous posts you've published. If authenticated, it will include posts on your account as well as any local / unclaimed posts.
95
-
96
-
Pass the `--url` flag to show the list with full post URLs, and the `--md` flag to return URLs with Markdown enabled.
97
-
98
-
To see post IDs with their Edit Tokens pass the `--v` flag.
99
-
100
-
```bash
101
-
$ writeas posts
102
-
aaaazzzzzzzza
103
-
104
-
$ writeas posts -url
105
-
https://write.as/aaaazzzzzzzza
106
-
107
-
$ writeas posts -v
108
-
ID Token
109
-
aaaazzzzzzzza dhuieoj23894jhf984hdfs9834hdf84j
110
-
```
111
-
112
-
#### Delete a post
113
-
114
-
This permanently deletes a post you own.
115
-
116
-
```bash
117
-
$ writeas delete aaaazzzzzzzza
118
-
```
119
-
120
-
#### Update a post
121
-
122
-
This completely overwrites an existing post you own.
123
-
124
-
```bash
125
-
$ echo"See you later!"| writeas update aaaazzzzzzzza
126
-
```
127
-
128
-
#### Claim a post
129
-
130
-
This moves an unsynced local post to a draft on your account. You will need to authenticate first.
131
-
```bash
132
-
$ writeas claim aaaazzzzzzzza
133
-
```
134
-
135
-
### Composing posts
136
-
137
-
If you simply have a penchant for never leaving your keyboard, `writeas` is great for composing new posts from the command-line. Just use the `new` subcommand.
138
-
139
-
`writeas new` will open your favorite command-line editor, as specified by your `WRITEAS_EDITOR` or `EDITOR` environment variables (in that order), falling back to `vim` on OS X / *nix.
140
-
141
-
Customize your post's appearance with the `--font` flag:
142
-
143
-
| Argument | Appearance (Typeface) | Word Wrap? |
144
-
| -------- | --------------------- | ---------- |
145
-
|`sans`| Sans-serif (Open Sans) | Yes |
146
-
|`serif`| Serif (Lora) | Yes |
147
-
|`wrap`| Monospace | Yes |
148
-
|`mono`| Monospace | No |
149
-
|`code`| Syntax-highlighted monospace | No |
150
-
151
-
Put it all together, e.g. publish with a sans-serif font: `writeas new --font sans`
152
-
153
-
If you're publishing Markdown, supply the `--md` flag to get a URL back that will render Markdown, e.g.: `writeas new --font sans --md`
8
+
## WriteFreely CLI
9
+
See full usage documentation on our [wf-cli User Guide](https://github.com/writeas/writeas-cli/blob/master/cmd/wf/GUIDE.md).
[](https://goreportcard.com/report/github.com/writeas/writeas-cli)[](http://webchat.freenode.net/?channels=writeas)[](https://discuss.write.as/c/development)
4
4
5
-
Command line interface for [Write.as](https://write.as). Works on Windows, macOS, and Linux.
5
+
Command line utility for publishing to [Write.as](https://write.as) and any other [WriteFreely](https://writefreely.org) instance. Works on Windows, macOS, and Linux.
6
6
7
7
## Features
8
8
9
-
*Publish anonymously to Write.as
10
-
*Authenticate with a Write.as account
9
+
*Authenticate with a Write.as / WriteFreely account
10
+
*Publish anonymous posts or drafts to Write.as or WriteFreely, respectively
11
11
* A stable, easy back-end for your [GUI app](https://write.as/apps/desktop) or desktop-based workflow
12
-
* Compatible with our [Tor hidden service](http://writeas7pm7rcdqg.onion/)
13
-
* Locally keeps track of any posts you make
14
-
* Update and delete posts, anonymous and authenticated
12
+
* Compatible with the [Write.as Tor hidden service](http://writeas7pm7rcdqg.onion/)
13
+
* Update and delete posts
15
14
* Fetch any post by ID
16
-
*Add anonymous post credentials (like for one published with the [Android app](https://play.google.com/store/apps/details?id=com.abunchtell.writeas)) for editing
15
+
*...and more, depending on which client you're using (see respective READMEs for more)
17
16
18
17
## Installing
19
18
The easiest way to get the CLI is to download a pre-built executable for your OS.
@@ -23,78 +22,19 @@ The easiest way to get the CLI is to download a pre-built executable for your OS
23
22
24
23
Get the latest version for your operating system as a standalone executable.
25
24
26
-
**Windows**<br />
27
-
Download the [64-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/writeas_2.0.0_windows_amd64.zip) or [32-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/writeas_2.0.0_windows_386.zip) executable and put it somewhere in your `%PATH%`.
25
+
**Write.as CLI**<br />
26
+
See the [writeas-cli README](https://github.com/writeas/writeas-cli/cmd/writeas#readme)
28
27
29
-
**macOS**<br />
30
-
Download the [64-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/writeas_2.0.0_darwin_amd64.zip) executable and put it somewhere in your `$PATH`, like `/usr/local/bin`.
Download the [64-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/writeas_2.0.0_linux_amd64.tar.gz) or [32-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/writeas_2.0.0_linux_386.tar.gz) executable and put it somewhere in your `$PATH`, like `/usr/local/bin`.
41
-
42
-
### Go get it
43
-
```bash
44
-
go get github.com/writeas/writeas-cli/cmd/writeas
45
-
```
46
-
47
-
Once this finishes, you'll see `writeas` or `writeas.exe` inside `$GOPATH/bin/`.
48
-
49
-
## Upgrading
50
-
51
-
To upgrade the CLI, download and replace the executable you downloaded before.
52
-
53
-
If you previously installed with `go get`, run it again with the `-u` option.
54
-
55
-
```bash
56
-
go get -u github.com/writeas/writeas-cli/cmd/writeas
57
-
```
28
+
**WriteFreely CLI**<br />
29
+
See the [wf-cli README](https://github.com/writeas/writeas-cli/cmd/wf#readme)
58
30
59
31
## Usage
60
32
61
-
See full usage documentation on our [User Guide](GUIDE.md).
post Alias for default action: create post from stdin
68
-
new Compose a new post from the command-line and publish
69
-
publish Publish a file to Write.as
70
-
delete Delete a post
71
-
update Update (overwrite) a post
72
-
get Read a raw post
73
-
add Add an existing post locally
74
-
posts List all of your posts
75
-
blogs List blogs
76
-
claim Claim local unsynced posts
77
-
auth Authenticate with Write.as
78
-
logout Log out of Write.as
79
-
help, h Shows a list of commands or help for one command
80
-
81
-
GLOBAL OPTIONS:
82
-
-c value, -b value Optional blog to post to
83
-
--tor, -t Perform action on Tor hidden service
84
-
--tor-port value Use a different port to connect to Tor (default: 9150)
85
-
--code Specifies this post is code
86
-
--md Returns post URL with Markdown enabled
87
-
--verbose, -v Make the operation more talkative
88
-
--font value Sets post font to given value (default: "mono")
89
-
--lang value Sets post language to given ISO 639-1 language code
90
-
--user-agent value Sets the User-Agent for API requests
91
-
--host value, -H value Operate against a custom hostname
92
-
--user value, -u value Use authenticated user, other than default
93
-
--help, -h show help
94
-
--version, -V print the version
95
-
```
96
-
97
-
> Note: the host and user flags are only available in `wf` the community edition
33
+
**Write.as CLI**<br />
34
+
See full usage documentation on our [writeas-cli User Guide](https://github.com/writeas/writeas-cli/blob/master/cmd/writeas/GUIDE.md).
35
+
36
+
**WriteFreely CLI**<br />
37
+
See full usage documentation on our [wf-cli User Guide](https://github.com/writeas/writeas-cli/blob/master/cmd/wf/GUIDE.md).
98
38
99
39
## Contributing to the CLI
100
40
@@ -108,4 +48,4 @@ We're available on [several channels](https://write.as/contact), and prefer our
108
48
109
49
### Reporting Issues
110
50
111
-
If you believe you have found a bug in the CLI or its documentation, file an issue on this repo. If you're not sure if it's a bug or not, [reach out to us](https://write.as/contact) in one way or another. Be sure to provide the version of the CLI (with `writeas --version`) in your report.
51
+
If you believe you have found a bug in the CLI or its documentation, file an issue on this repo. If you're not sure if it's a bug or not, [reach out to us](https://write.as/contact) in one way or another. Be sure to provide the version of the CLI (with `writeas --version` or `wf --version`) in your report.
0 commit comments