The title essentially says it all. Consider the category $\mathfrak{Top}_2$ of triples $(J,e_0,e_1)$ where $J$ is a topological space, and $e_i \in  J$. There is an obvious generalization of the definition of homotopic maps. Suppose we have selected $(J,e_0,e_1)\in \mathfrak{Top}_2$. We could say that two continuous maps $f,g:X\to Y$ are "$J$-homotopic"  if there is a continuous map $h:X\times J\to Y$ such that $h(x,e_0) = f(x)$ and $h(x,e_1) = g(x)$. We could then define $\pi_1 (X,x)$ to be the set of continuous maps $f:J\to X$ satisfying $f(e_0)=f(e_1)=x$, with $J$-homotopic maps identified. Here  in order to define composition of paths in the naive way, we need to have picked some <strike>homeomorphism</strike> continuous map from $J$ to $(\{0\}\times J\cup \{1\}\times J)/((\{0\},e_1) = (1,e_0))$, taking $e_0$ to $e_0\times 0$ and $e_1$ to $e_1\times 1$. I have two questions:

1. Can $([0,1],0,1)$ be characterized as an object in $\mathfrak{Top}_2$ in a purely categorical manner?

2. When is $\pi_1 (X,x)$ a group? For that matter, when is $\pi_1 (X,x)$ associative?



Essentially, the question comes down to: what properties of $[0,1]$ are needed in order to do homotopy theory?