Skip to content

Commit af9d2e4

Browse files
authored
rust(chore): sift-cli v0.1.0 release (#506)
1 parent 1f4e991 commit af9d2e4

6 files changed

Lines changed: 41 additions & 16 deletions

File tree

rust/crates/sift_cli/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Change Log
2+
All notable changes to `sift-cli` will be documented in this file.
3+
4+
This project adheres to [Semantic Versioning](http://semver.org/).
5+
6+
## [v0.1.0] - March 23, 2026
7+
8+
### What's New
9+
10+
#### Calculated channel support
11+
The CLI now supports calculated channels when exporting data.
12+
13+
#### Binary renamed to `sift-cli`
14+
The final binary has been renamed from `sift_cli` to `sift-cli` to follow new standardized naming conventions across Sift tools.
15+
16+
### Full Changelog
17+
- [Support calculated channels in CLI](https://github.com/sift-stack/sift/commit/666ad02d)

rust/crates/sift_cli/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sift_cli"
3-
version = "0.1.0-alpha.3"
3+
version = "0.1.0"
44
authors.workspace = true
55
edition.workspace = true
66
categories.workspace = true
@@ -10,6 +10,11 @@ keywords.workspace = true
1010
readme.workspace = true
1111
license.workspace = true
1212
description = "CLI to streamline programmatic workflows with Sift's API"
13+
changelog = "CHANGELOG.md"
14+
15+
[[bin]]
16+
name = "sift-cli"
17+
path = "src/main.rs"
1318

1419
[dependencies]
1520
anyhow = { workspace = true }

rust/crates/sift_cli/src/cmd/completions.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
use crate::BIN_NAME;
2+
use anyhow::{Context, Result, anyhow};
3+
use clap::CommandFactory;
4+
use clap_complete::{Shell, generate};
5+
use crossterm::style::Stylize;
16
use std::{
27
env,
38
fs::{self, File},
@@ -7,11 +12,6 @@ use std::{
712
str::FromStr,
813
};
914

10-
use anyhow::{Context, Result, anyhow};
11-
use clap::{CommandFactory, crate_name};
12-
use clap_complete::{Shell, generate};
13-
use crossterm::style::Stylize;
14-
1515
use crate::{
1616
cli::{self, CompletionsPrintArgs},
1717
util::tty::Output,
@@ -26,7 +26,7 @@ pub fn print(args: CompletionsPrintArgs) -> Result<ExitCode> {
2626
let mut cmd = cli::Args::command();
2727
let mut stdout = io::stdout();
2828

29-
generate(shell, &mut cmd, crate_name!(), &mut stdout);
29+
generate(shell, &mut cmd, BIN_NAME, &mut stdout);
3030

3131
Ok(ExitCode::SUCCESS)
3232
}
@@ -36,11 +36,11 @@ pub fn update() -> Result<ExitCode> {
3636
let root = get_config_root()?;
3737

3838
let (dir_path, filename) = match try_get_shell()? {
39-
Shell::Zsh => (root.join(".zsh-complete"), format!("_{}", crate_name!())),
40-
Shell::Bash => (root.join(".bash_completion.d"), String::from(crate_name!())),
39+
Shell::Zsh => (root.join(".zsh-complete"), format!("_{}", BIN_NAME)),
40+
Shell::Bash => (root.join(".bash_completion.d"), String::from(BIN_NAME)),
4141
Shell::Fish => (
4242
get_fish_completions_dir(&root),
43-
format!("{}.fish", crate_name!()),
43+
format!("{}.fish", BIN_NAME),
4444
),
4545
_ => {
4646
Output::new()
@@ -67,7 +67,7 @@ pub fn update() -> Result<ExitCode> {
6767
.with_context(|| format!("failed to create/open {}", completions_file_path.display()))?;
6868

6969
let mut cmd = cli::Args::command();
70-
generate(shell, &mut cmd, crate_name!(), &mut completions_file);
70+
generate(shell, &mut cmd, BIN_NAME, &mut completions_file);
7171

7272
let mut out = Output::new();
7373
out.line(format!(

rust/crates/sift_cli/src/cmd/config.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use crate::BIN_NAME;
12
use anyhow::{Context, Result, anyhow};
23
use crossterm::style::Stylize;
34
use std::{
@@ -33,7 +34,7 @@ pub fn create() -> Result<ExitCode> {
3334
))
3435
.tip(format!(
3536
"Use '{}' to configure it.",
36-
"sift_cli config update".green()
37+
format!("{BIN_NAME} config update").green()
3738
))
3839
.print();
3940

@@ -105,7 +106,7 @@ pub fn config_where() -> Result<ExitCode> {
105106
.line(format!("'{}' not found.", p.yellow()))
106107
.tip(format!(
107108
"try running '{}' first.",
108-
"sift_cli config create".green()
109+
format!("{BIN_NAME} config create").green()
109110
))
110111
.eprint();
111112
return Ok(ExitCode::FAILURE);

rust/crates/sift_cli/src/cmd/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use std::{fs::read_to_string, io::ErrorKind};
2-
1+
use crate::BIN_NAME;
32
use anyhow::{Context as AnyhowContext, Result, anyhow};
43
use crossterm::style::Stylize;
4+
use std::{fs::read_to_string, io::ErrorKind};
55
use toml::{Table, Value};
66

77
pub mod completions;
@@ -29,7 +29,7 @@ impl Context {
2929
ErrorKind::NotFound => {
3030
return Err(anyhow!("expected to find '{}'.", p.yellow())).context(format!(
3131
"Create a config using '{}'.",
32-
"sift_cli config create".green()
32+
format!("{BIN_NAME} config create").green()
3333
));
3434
}
3535
_ => return Err(anyhow!("failed to read config file")),

rust/crates/sift_cli/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use util::tty::Output;
1414

1515
use clap::Parser;
1616

17+
const BIN_NAME: &str = "sift-cli";
18+
1719
fn main() -> ExitCode {
1820
let args = cli::Args::parse();
1921

0 commit comments

Comments
 (0)