Code Monkey home page Code Monkey logo

Comments (3)

apricote avatar apricote commented on June 21, 2024 2

Hey @guettli, I have added a +1 on our internal feature request board for "GET current-project" endpoint.

Closing the issue, as the CLI can only implement endpoints that are available in the API.


PS. I also work with different projects & tokens regularly, so I added this to my oh-my-zsh prompt:

~ hc:(personal) which hcloud_ps1
hcloud_ps1 () {
	local HCLOUD_PS1
	HCLOUD_PS1_CONTEXT="$(hcloud context active)"
	HCLOUD_PS1+="%{$fg_bold[blue]%}hc:("
	HCLOUD_PS1+="%{$fg_bold[red]%}"
	HCLOUD_PS1+="${HCLOUD_PS1_CONTEXT}"
	HCLOUD_PS1+="%{$fg_bold[blue]%})%{$reset_color%}"
	echo "${HCLOUD_PS1}"
}
➜  ~ hc:(personal)

from cli.

phm07 avatar phm07 commented on June 21, 2024

Unfortunately the API does not offer a possibility to identify a token's parent project at the moment. However, you can probably achieve similar functionality by using contexts. You can create one context for each of your projects and then use hcloud context active to show your current context/project or hcloud context use to switch it.

from cli.

guettli avatar guettli commented on June 21, 2024

@pauhull I would like to solve the underlying issue: Who is responsible for the API and how to contact this person?

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.