diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index dba0a365..12026e90 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -44,7 +44,7 @@ body:
id: terms
attributes:
label: Code of Conduct
- description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/subspace/subspace-cli/blob/main/CODE_OF_CONDUCT.md) # TODO: fix this link
+ description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/subspace/pulsar/blob/main/CODE_OF_CONDUCT.md) # TODO: fix this link
options:
- label: I agree to follow this project's Code of Conduct
required: true
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 5f38a90e..8cfdbd96 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -20,7 +20,7 @@ body:
id: terms
attributes:
label: Code of Conduct
- description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/subspace/subspace-cli/blob/main/CODE_OF_CONDUCT.md) # TODO: fix this link
+ description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/subspace/pulsar/blob/main/CODE_OF_CONDUCT.md) # TODO: fix this link
options:
- label: I agree to follow this project's Code of Conduct
required: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f238625c..c5e36500 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -91,7 +91,7 @@ jobs:
if: matrix.build.target != 'aarch64-unknown-linux-gnu'
with:
command: build
- args: --locked -Z build-std --target ${{ matrix.build.target }} --profile production --bin subspace-cli
+ args: --locked -Z build-std --target ${{ matrix.build.target }} --profile production --bin pulsar
# TODO: get rid of this when we have bigger RAM for aarch64 linux
- name: Build the executable for aarch64 linux separately
@@ -99,7 +99,7 @@ jobs:
if: matrix.build.target == 'aarch64-unknown-linux-gnu'
with:
command: build
- args: --locked -Z build-std --target ${{ matrix.build.target }} --profile aarch64linux --bin subspace-cli
+ args: --locked -Z build-std --target ${{ matrix.build.target }} --profile aarch64linux --bin pulsar
- name: Sign and Notarize Application (macOS)
run: |
@@ -111,10 +111,10 @@ jobs:
security import certificate.p12 -k build.keychain -P "${{ secrets.MACOS_CERTIFICATE_PASSWORD }}" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${{ secrets.MACOS_CERTIFICATE_PASSWORD }}" build.keychain
echo "Signing farmer"
- codesign --force --options=runtime --entitlements .github/workflows/Entitlements.plist -s "${{ secrets.MACOS_IDENTITY }}" --timestamp ${{ matrix.build.production_target }}/subspace-cli
+ codesign --force --options=runtime --entitlements .github/workflows/Entitlements.plist -s "${{ secrets.MACOS_IDENTITY }}" --timestamp ${{ matrix.build.production_target }}/pulsar
echo "Creating an archive"
mkdir ${{ matrix.build.production_target }}/macos-binaries
- cp ${{ matrix.build.production_target }}/subspace-cli ${{ matrix.build.production_target }}/macos-binaries
+ cp ${{ matrix.build.production_target }}/pulsar ${{ matrix.build.production_target }}/macos-binaries
ditto -c -k --rsrc ${{ matrix.build.production_target }}/macos-binaries subspace-binaries.zip
echo "Notarizing"
brew update
@@ -158,22 +158,22 @@ jobs:
- name: Prepare executables for uploading (Ubuntu)
run: |
mkdir executables
- mv ${{ matrix.build.production_target }}/subspace-cli executables/subspace-cli-${{ matrix.build.suffix }}
+ mv ${{ matrix.build.production_target }}/pulsar executables/pulsar-${{ matrix.build.suffix }}
if: runner.os == 'Linux'
- name: Prepare executables for uploading (macOS)
run: |
mkdir executables
- mv ${{ matrix.build.production_target }}/subspace-cli executables/subspace-cli-${{ matrix.build.suffix }}
+ mv ${{ matrix.build.production_target }}/pulsar executables/pulsar-${{ matrix.build.suffix }}
# Zip it so that signature is not lost
- ditto -c -k --rsrc executables/subspace-cli-${{ matrix.build.suffix }} executables/subspace-cli-${{ matrix.build.suffix }}.zip
- rm executables/subspace-cli-${{ matrix.build.suffix }}
+ ditto -c -k --rsrc executables/pulsar-${{ matrix.build.suffix }} executables/pulsar-${{ matrix.build.suffix }}.zip
+ rm executables/pulsar-${{ matrix.build.suffix }}
if: runner.os == 'macOS'
- name: Prepare executables for uploading (Windows)
run: |
mkdir executables
- move ${{ matrix.build.production_target }}/subspace-cli.exe executables/subspace-cli-${{ matrix.build.suffix }}.exe
+ move ${{ matrix.build.production_target }}/pulsar.exe executables/pulsar-${{ matrix.build.suffix }}.exe
if: runner.os == 'Windows'
- name: Upload executable to artifacts
diff --git a/Cargo.lock b/Cargo.lock
index 3e6a9b72..41c519f6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6285,6 +6285,50 @@ dependencies = [
"cc",
]
+[[package]]
+name = "pulsar"
+version = "0.5.4"
+dependencies = [
+ "anyhow",
+ "async-stream",
+ "bytesize",
+ "bytesize-serde",
+ "clap",
+ "color-eyre",
+ "console-subscriber",
+ "crossterm",
+ "derivative",
+ "derive_more",
+ "dirs 4.0.0",
+ "fdlimit",
+ "futures",
+ "indicatif",
+ "jemallocator",
+ "libp2p-core 0.38.0",
+ "num-rational",
+ "num-traits",
+ "open",
+ "owo-colors",
+ "rand 0.8.5",
+ "serde",
+ "serde_derive",
+ "single-instance",
+ "sp-core",
+ "strum",
+ "strum_macros",
+ "subspace-sdk",
+ "thiserror",
+ "tokio",
+ "toml 0.7.5",
+ "tracing",
+ "tracing-appender",
+ "tracing-bunyan-formatter",
+ "tracing-error",
+ "tracing-subscriber 0.3.17",
+ "whoami",
+ "zeroize",
+]
+
[[package]]
name = "quick-error"
version = "1.2.3"
@@ -9373,50 +9417,6 @@ dependencies = [
"thiserror",
]
-[[package]]
-name = "subspace-cli"
-version = "0.5.4"
-dependencies = [
- "anyhow",
- "async-stream",
- "bytesize",
- "bytesize-serde",
- "clap",
- "color-eyre",
- "console-subscriber",
- "crossterm",
- "derivative",
- "derive_more",
- "dirs 4.0.0",
- "fdlimit",
- "futures",
- "indicatif",
- "jemallocator",
- "libp2p-core 0.38.0",
- "num-rational",
- "num-traits",
- "open",
- "owo-colors",
- "rand 0.8.5",
- "serde",
- "serde_derive",
- "single-instance",
- "sp-core",
- "strum",
- "strum_macros",
- "subspace-sdk",
- "thiserror",
- "tokio",
- "toml 0.7.5",
- "tracing",
- "tracing-appender",
- "tracing-bunyan-formatter",
- "tracing-error",
- "tracing-subscriber 0.3.17",
- "whoami",
- "zeroize",
-]
-
[[package]]
name = "subspace-core-primitives"
version = "0.1.0"
diff --git a/Cargo.toml b/Cargo.toml
index 102745e3..2d9927fc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "subspace-cli"
+name = "pulsar"
version = "0.5.4"
edition = "2021"
diff --git a/README.md b/README.md
index b73c4788..8794ca36 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-# Subspace CLI
+# Pulsar
-Subspace CLI simplifies the farming process on Subspace Network.
+Pulsar simplifies the farming process on Subspace Network.
-[![ci-tests](https://img.shields.io/github/actions/workflow/status/subspace/subspace-cli/ci-tests.yml?branch=main&label=CI&logo=github&style=for-the-badge)](https://github.com/subspace/subspace-cli/actions/workflows/ci-tests.yml)
-[![Rust Docs](https://img.shields.io/github/actions/workflow/status/subspace/subspace-cli/rustdoc.yml?branch=main&label=RUST-DOCS&logo=github&style=for-the-badge)](https://github.com/subspace/subspace-cli/actions/workflows/rustdoc.yml)
-[![Latest Release](https://img.shields.io/github/v/release/subspace/subspace-cli?include_prereleases&logo=github&style=for-the-badge)](https://github.com/subspace/subspace-cli/releases)
+[![ci-tests](https://img.shields.io/github/actions/workflow/status/subspace/pulsar/ci-tests.yml?branch=main&label=CI&logo=github&style=for-the-badge)](https://github.com/subspace/pulsar/actions/workflows/ci-tests.yml)
+[![Rust Docs](https://img.shields.io/github/actions/workflow/status/subspace/pulsar/rustdoc.yml?branch=main&label=RUST-DOCS&logo=github&style=for-the-badge)](https://github.com/subspace/pulsar/actions/workflows/rustdoc.yml)
+[![Latest Release](https://img.shields.io/github/v/release/subspace/pulsar?include_prereleases&logo=github&style=for-the-badge)](https://github.com/subspace/pulsar/releases)
-![prompt](images/subspace-cli-prompt.png)
+![prompt](images/pulsar-prompt.png)
@@ -18,11 +18,11 @@ Instead of running a terminal instance for the farmer, and running another termi
## How to Use (commands)
-1. download the executable from [releases](https://github.com/subspace/subspace-cli/releases)
+1. download the executable from [releases](https://github.com/subspace/pulsar/releases)
2. in your terminal, change your directory to where you download the file for example: if you downloaded your file to your `Downloads` folder, `cd Downloads`)
-3. we will address your executable name as `subspace-cli`, change the below commands accordingly to your full executable name.
-3. run `./subspace-cli init` -> this will initialize your config file, which will store the necessary information for you to farm.
-4. run `./subspace-cli farm` -> this will start farming. Yes, it is that simple! Enjoy!
+3. we will address your executable name as `pulsar`, change the below commands accordingly to your full executable name.
+3. run `./pulsar init` -> this will initialize your config file, which will store the necessary information for you to farm.
+4. run `./pulsar farm` -> this will start farming. Yes, it is that simple! Enjoy!
## Other commands
@@ -46,7 +46,7 @@ This will create a new `tmux` session using a socket file named `farming`.
Once the tmux session is created, you can go ahead and run the farming process.
```sh
-$ ./subspace-cli farm
+$ ./pulsar farm
```
Once it's running, you can detach the process by pressing `CTRL+b d` (read more about [detaching a sessions](https://linuxhint.com/detach-session-tmux/))
@@ -75,7 +75,7 @@ screen -S farming
This will create a new `screen` session.
```sh
-./subspace-cli farm
+./pulsar farm
```
Once it's running, you can detach the process by pressing `CTRL+d a`.
diff --git a/images/subspace-cli-prompt.png b/images/pulsar-prompt.png
similarity index 100%
rename from images/subspace-cli-prompt.png
rename to images/pulsar-prompt.png
diff --git a/src/config.rs b/src/config.rs
index 1c5f9e20..d254e4d2 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -147,16 +147,15 @@ impl std::str::FromStr for ChainConfig {
}
/// Creates a config file at the location
-/// - **Linux:** `$HOME/.config/subspace-cli/settings.toml`.
-/// - **macOS:** `$HOME/Library/Application Support/subspace-cli/settings.toml`.
-/// - **Windows:** `{FOLDERID_RoamingAppData}/subspace-cli/settings.toml`.
+/// - **Linux:** `$HOME/.config/pulsar/settings.toml`.
+/// - **macOS:** `$HOME/Library/Application Support/pulsar/settings.toml`.
+/// - **Windows:** `{FOLDERID_RoamingAppData}/pulsar/settings.toml`.
pub(crate) fn create_config() -> Result<(File, PathBuf)> {
- let config_path = dirs::config_dir()
- .expect("couldn't get the default config directory!")
- .join("subspace-cli");
+ let config_path =
+ dirs::config_dir().expect("couldn't get the default config directory!").join("pulsar");
if let Err(err) = create_dir_all(&config_path) {
- let config_path = config_path.to_str().expect("couldn't get subspace-cli config path!");
+ let config_path = config_path.to_str().expect("couldn't get pulsar config path!");
return Err(err).wrap_err(format!("could not create the directory: `{config_path}`"));
}
@@ -169,7 +168,7 @@ pub(crate) fn create_config() -> Result<(File, PathBuf)> {
#[instrument]
pub(crate) fn parse_config() -> Result {
let config_path = dirs::config_dir().expect("couldn't get the default config directory!");
- let config_path = config_path.join("subspace-cli").join("settings.toml");
+ let config_path = config_path.join("pulsar").join("settings.toml");
let config: Config = toml::from_str(&std::fs::read_to_string(config_path)?)?;
Ok(config)
diff --git a/src/summary.rs b/src/summary.rs
index b027c532..e0c7b29c 100644
--- a/src/summary.rs
+++ b/src/summary.rs
@@ -210,5 +210,5 @@ pub(crate) fn summary_path() -> PathBuf {
#[instrument]
fn summary_dir() -> PathBuf {
- dirs::cache_dir().expect("couldn't get the directory!").join("subspace-cli")
+ dirs::cache_dir().expect("couldn't get the directory!").join("pulsar")
}
diff --git a/src/tests.rs b/src/tests.rs
index e2181410..2ccc55da 100644
--- a/src/tests.rs
+++ b/src/tests.rs
@@ -144,13 +144,13 @@ fn plot_directory_tester() {
let plot_path = plot_directory_getter();
#[cfg(target_os = "macos")]
- assert!(plot_path.ends_with("Library/Application Support/subspace-cli/plots"));
+ assert!(plot_path.ends_with("Library/Application Support/pulsar/plots"));
#[cfg(target_os = "linux")]
- assert!(plot_path.ends_with(".local/share/subspace-cli/plots"));
+ assert!(plot_path.ends_with(".local/share/pulsar/plots"));
#[cfg(target_os = "windows")]
- assert!(plot_path.ends_with("AppData/Roaming/subspace-cli/plots"));
+ assert!(plot_path.ends_with("AppData/Roaming/pulsar/plots"));
}
#[test]
@@ -158,13 +158,13 @@ fn cache_directory_tester() {
let cache_path = cache_directory_getter();
#[cfg(target_os = "macos")]
- assert!(cache_path.ends_with("Library/Application Support/subspace-cli/cache"));
+ assert!(cache_path.ends_with("Library/Application Support/pulsar/cache"));
#[cfg(target_os = "linux")]
- assert!(cache_path.ends_with(".local/share/subspace-cli/cache"));
+ assert!(cache_path.ends_with(".local/share/pulsar/cache"));
#[cfg(target_os = "windows")]
- assert!(cache_path.ends_with("AppData/Roaming/subspace-cli/cache"));
+ assert!(cache_path.ends_with("AppData/Roaming/pulsar/cache"));
}
#[test]
@@ -172,13 +172,13 @@ fn node_directory_tester() {
let node_path = node_directory_getter();
#[cfg(target_os = "macos")]
- assert!(node_path.ends_with("Library/Application Support/subspace-cli/node"));
+ assert!(node_path.ends_with("Library/Application Support/pulsar/node"));
#[cfg(target_os = "linux")]
- assert!(node_path.ends_with(".local/share/subspace-cli/node"));
+ assert!(node_path.ends_with(".local/share/pulsar/node"));
#[cfg(target_os = "windows")]
- assert!(node_path.ends_with("AppData/Roaming/subspace-cli/node"));
+ assert!(node_path.ends_with("AppData/Roaming/pulsar/node"));
}
#[test]
@@ -186,11 +186,11 @@ fn custom_log_dir_test() {
let log_path = custom_log_dir();
#[cfg(target_os = "macos")]
- assert!(log_path.ends_with("Library/Logs/subspace-cli"));
+ assert!(log_path.ends_with("Library/Logs/pulsar"));
#[cfg(target_os = "linux")]
- assert!(log_path.ends_with(".local/share/subspace-cli/logs"));
+ assert!(log_path.ends_with(".local/share/pulsar/logs"));
#[cfg(target_os = "windows")]
- assert!(log_path.ends_with("AppData/Local/subspace-cli/logs"));
+ assert!(log_path.ends_with("AppData/Local/pulsar/logs"));
}
diff --git a/src/utils.rs b/src/utils.rs
index 046b33e4..ff6b2607 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -159,12 +159,12 @@ pub(crate) fn provider_storage_dir_getter() -> PathBuf {
}
fn data_dir_getter() -> PathBuf {
- dirs::data_dir().expect("data folder must be present in every major OS").join("subspace-cli")
+ dirs::data_dir().expect("data folder must be present in every major OS").join("pulsar")
}
/// returns OS specific log directory
pub(crate) fn custom_log_dir() -> PathBuf {
- let id = "subspace-cli";
+ let id = "pulsar";
#[cfg(target_os = "macos")]
let path = dirs::home_dir().map(|dir| dir.join("Library/Logs").join(id));
@@ -227,7 +227,7 @@ pub(crate) fn install_tracing(is_verbose: bool, no_rotation: bool) {
} else {
RollingFileAppender::builder().max_log_files(KEEP_LAST_N_FILE).rotation(Rotation::HOURLY)
}
- .filename_prefix("subspace-cli.log")
+ .filename_prefix("pulsar.log")
.build(log_dir)
.expect("building should always succeed");
@@ -248,7 +248,7 @@ pub(crate) fn install_tracing(is_verbose: bool, no_rotation: bool) {
let tracing_layer = tracing_layer
.with(
- BunyanFormattingLayer::new("subspace-cli".to_owned(), file_appender)
+ BunyanFormattingLayer::new("pulsar".to_owned(), file_appender)
.and_then(JsonStorageLayer)
.with_filter(filter()),
)